package com.slipper.sfts.order.service.support;

import com.slipper.PaasContext;
import com.slipper.common.util.StringUtil;
import com.slipper.qmt.vo.OrderResultVO;
import com.slipper.sfts.order.service.IDealer;
import com.slipper.sfts.stock.service.StockOrderService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class OrderResultDealer implements IDealer<OrderResultVO> {
    private static final Logger logger = LoggerFactory.getLogger(OrderResultDealer.class);

    @Override
    public void doDeal(OrderResultVO vo) {
        logger.info("接收到下单结果回调消息：{}", vo);
        if (StringUtil.isBlank(vo.getStockOrderId()) || vo.getOrderId() == null) return;
        PaasContext.getBean(StockOrderService.class).dealOrderResult(vo);
    }
}
